#include <Python.h>

#include <fcntl.h>
#include "/usr/src/modules/lm-sensors/kernel/include/i2c-dev.h"

/*#include <asm/io.h>
#include <unistd.h>*/

int main(int argc, char **argv);
PyMODINIT_FUNC initi2c(void);
static PyObject *i2c_open(PyObject *self, PyObject *args);
static PyObject *i2c_slave(PyObject *self, PyObject *args);
static PyObject *i2c_write(PyObject *self, PyObject *args);
static PyObject *i2c_read(PyObject *self, PyObject *args);
static PyObject *i2c_close(PyObject *self, PyObject *args);

static PyMethodDef i2cmethods[] = {
  /* "python method name", method handler, parameter type for hander, "document string" */
  { "open", i2c_open, METH_VARARGS, "Initialize" },
  { "slave", i2c_slave, METH_VARARGS, "Initialize" },
  { "write", i2c_write, METH_VARARGS, "Initialize" },
  { "read", i2c_read, METH_VARARGS, "Initialize" },
  { "close", i2c_close, METH_VARARGS, "Initialize" },
  /* Array end indicator */
  { NULL, NULL, 0, NULL }
};


